Textanalyse
In onderhoud alphaversie
Semanta Tel:+31-162-313323 of International +1-514-331-0572
";
$bzv1_dtls=explode(" ",$invr_bzv1);
if (count($bzv1_dtls) > 1)
{
// echo "
Deze functie werkt alleen met woordvormen bestaande uit een enkel woord. Probeer het opnieuw aub";
}
////////
// echo "
TEST CALC TEXT ".$invr_chbt." INVR CORP ".$invr_corp." INVR BZV1 ".$invr_bzv1." INVR BZV2 ".$invr_bzv2;
$invr_bzv1=str_replace(";",".",$invr_bzv1);
////////////////////// VERTALINGEN
$uw_vraag=text_isrt($invr_taal."@uw vraag");
$suw_vraag=str_replace(" ","_",$uw_vraag);
$uw_antwoord=text_isrt($invr_taal."@uw antwoord");
$suw_antwoord=str_replace(" ","_",$uw_antwoord);
$bezoeker=''.text_isrt($invr_taal."@bezoeker");
$chatbotleraar=text_isrt($invr_taal."@chatbotleraar");
$automatisch_vertalen=text_isrt($invr_taal."@automatisch vertalen");
$vertalingen=text_isrt($invr_taal."@vertalingen");
$uvertalingen=strtoupper($vertalingen);
$analyse=text_isrt($invr_taal."@analyse");
$taalkunde=text_isrt($invr_taal."@taalkunde");
$infrastructuur=text_isrt($invr_taal."@infrastructuur");
$aansprakelijkheid=''.text_isrt($invr_taal."@aansprakelijkheid");
$handelsmerken=text_isrt($invr_taal."@handelsmerken");
$statistieken=text_isrt($invr_taal."@statistieken");
$kennisdomeinen=text_isrt($invr_taal."@kennisdomeinen");
$gebruikersteksten=text_isrt($invr_taal."@gebruikersteksten");
$medische_termen=text_isrt($invr_taal."@medische termen");
$alpha_versie=text_isrt($invr_taal."@alpha versie")." ".$modl;
$alpha_versie=''.text_isrt($invr_taal."@".$alpha_versie);
$sprk_taal=" ".text_isrt($invr_taal."@en spreek")." ".text_isrt($invr_taal."@".$invr_taal);
$copy_rght='Copyright Lingvistica BTW NL810085136B01 KvK 18062655';
$copy_rght=text_isrt($invr_taal."@".$copy_rght);
$copy_rght=''.$copy_rght.' 2001-2015';
$versie=text_isrt($invr_taal."@alpha versie");
$bezoeker=text_isrt($invr_taal."@bezoeker");
// echo "
BEZOEKER ".$bezoeker;
$woordonderhoud=text_isrt($invr_taal."@woordonderhoud");
$engl_taal=text_isrt("engels@".$invr_taal);
$spch_taal=text_isrt($invr_taal."@".$invr_taal);
$taal=text_isrt($invr_taal."@taal");
$IP_address=text_isrt($invr_taal."@IP address");
$taal=text_isrt($invr_taal."@taal");
$informatie=text_isrt($invr_taal."@informatie");
$internethelper=text_isrt($invr_taal."@internet helper");
$taal_communicatie=text_isrt($invr_taal."@Taal is een menselijk communicatiesysteem dat betekenis kan weergeven en doorgeven");
$zelfstandige_webpagina=text_isrt($invr_taal."@zelfstandige_webpagina");
$zegt_u_het_maar=text_isrt($invr_taal."@zegt u het maar");
$hoe_gebruikt_men=text_isrt($invr_taal."@hoe gebruikt men");
$semanta_spreekt=text_isrt($invr_taal."@Semanta of hoe een computerprogramma zou kunnen leren praten");
$lingvistica_taal=text_isrt($invr_taal."@lingvistica houdt zich bezig met taal alle talen");
$aanmelden=text_isrt($invr_taal."@aanmelden");
$we_spreken_nu=text_isrt($invr_taal."@we spreken nu");
$andere_webpagina=text_isrt($invr_taal."@andere webpagina");
$andere_chatbot=text_isrt($invr_taal."@ik wil een nieuwe chatbot maken");
$onderwerpen=text_isrt($invr_taal."@onderwerpen");
$chatbotnaam=text_isrt($invr_taal."@Chatbotnaam");
$gesprekspartner=text_isrt($invr_taal."@".$invr_chbt);
$naar_de_voorgrond=text_isrt($invr_taal."@Naar de voorgrond");
$taal=text_isrt($invr_taal."@taal");
$kenmerk=text_isrt($invr_taal."@kenmerk");
$waarde=text_isrt($invr_taal."@waarde");
$landnaam=text_isrt($invr_taal."@landnaam");
$partners=text_isrt($invr_taal."@partnering ?");
$bzkr_land=text_isrt($invr_taal."@".$invr_bzv1);
$bestand_selecteren=text_isrt($invr_taal."@bestand selecteren");
$geen_bestand_geselecteerd=text_isrt($invr_taal."@geen bestand geselecteerd");
$bestand_versturen=text_isrt($invr_taal."@bestand versturen");
$we_gaan_beginnen=text_isrt($invr_taal."@We gaan beginnen");
$verwacht_doorlooptijd_van=text_isrt($invr_taal."@verwacht doorlooptijd van");
$uw_bestand_is_foutief=text_isrt($invr_taal."@uw bestand is foutief");
$probeer_het_svp_opnieuw=text_isrt($invr_taal."@probeer het svp opnieuw");
$ip_adres=text_isrt($invr_taal."@ip-adres");
$taal=''.text_isrt($invr_taal."@Taal");
$land=''.text_isrt($invr_taal."@land");
$product_talen=text_isrt($invr_taal."@Talen waarvoor lingvistica producten en diensten heeft ontwikkeld.");
$uw_vraag=text_isrt($invr_taal."@uw vraag");
$bezoeker=''.text_isrt($invr_taal."@bezoeker");
$chatbotleraar=text_isrt($invr_taal."@chatbotleraar");
$vertalingen=text_isrt($invr_taal."@vertalingen");
$analyse=text_isrt($invr_taal."@analyse");
$taalkunde=text_isrt($invr_taal."@taalkunde");
$aansprakelijkheid=''.text_isrt($invr_taal."@aansprakelijkheid");
$handelsmerken=text_isrt($invr_taal."@handelsmerken");
$statistieken=text_isrt($invr_taal."@statistieken");
$kennisdomeinen=text_isrt($invr_taal."@kennisdomeinen");
$gebruikersteksten=text_isrt($invr_taal."@gebruikersteksten");
$medische_termen=text_isrt($invr_taal."@medische termen");
$alpha_versie=text_isrt($invr_taal."@alpha versie")." ".$modl;
$alpha_versie=''.text_isrt($invr_taal."@".$alpha_versie);
$sprk_taal="
".text_isrt($invr_taal."@en spreek")." ".text_isrt($invr_taal."@".$bzkr_taal);
$copy_rght='Copyright 2001-2011 Lingvistica BTW NL810085136B01 KvK 18062655';
$copy_rght=text_isrt($invr_taal."@".$copy_rght);
$copy_rght=''.$copy_rght.'';
$versie=text_isrt($invr_taal."@alpha versie");
$bezoeker=text_isrt($invr_taal."@bezoeker");
$taal=text_isrt($invr_taal."@language");
$IP_address=text_isrt($invr_taal."@IP address");
$taal=text_isrt($invr_taal."@taal");
$informatie=text_isrt($invr_taal."@informatie");
$internethelper=text_isrt($invr_taal."@internet helper");
$gesprekspartner=text_isrt($invr_taal."@gesprekspartner");
$chbt_hello="";
// $lgroet=chbt_date("IT@1@2@".$invr_taal."@".$invr_bzkr);
$leer_uw_computer_praten=text_isrt($invr_taal."@chatbotleraar");
$automatisch_vertalen=text_isrt($invr_taal."@automatisch vertalen");
$lec_text="translate-demos.asp";
$leesplezier=text_isrt($invr_taal."@leesplezier");
$gekozen_chatbot=text_isrt($invr_taal."@Gekozen taal en chatbot");
$taalkundige=text_isrt($invr_taal."@taalkundige");
/////////////////////////////////////////////////////
// echo "
OP NAAR BEPL SPLT FUNC ";
if ($invr_name == null)
{
$invr_name="bezoeker";
}
if ($invr_taal == null)
{
$invr_taal== "nederlands";
}
$invr_ipcd=taal_ipcd($invr_taal);
// print_r($calc_rslt);
echo "
OP NAAR BEPL SPLT FUNC ";
$calc_rslt=calc_text($invr_bzv1);
$sinvr_bzv1=str_replace(" ","+",$invr_bzv1);
// print_r($calc_rslt);
foreach($calc_rslt as $splt_key => $splt_val)
{
// echo "
SPLT KEY ".$splt_key. " SPLT VAL ".$splt_val;
}
if (count($calc_rslt) == 0)
{
// echo "Ik kan de zin niet segmenteren klik om verder te gaan.";
// echo "
".$analyse." ".$uw_antwoord." ".$leer_uw_computer_praten."";
}
if (count($calc_rslt) > 0)
{
echo "
".$invr_name."Uw uiting leidt tot ".count($calc_rslt)."conclusies over de aard van ".$invr_bzv1;
$sr=0;
echo "";
$smts_rslt=tlkd_smts($invr_bzv1);
$strn_val=$invr_lgrm;
// print_r($smts_rslt);
$tlkd_rslt=smta_tlkd($invr_bzv1."@tlkd");
$tlkd_smts=array();
// echo "
TLKD RSLT
";
foreach ($tlkd_rslt as $tlkd_key => $tlkd_val)
{
$last_text="";
// echo "
KEY ".$tlkd_key." VAL ".$tlkd_val;
$key_itms=explode("@",$tlkd_key);
// echo "
KEY ITMS
";
print_r($key_itms);
$tlkd_gram=$key_itms[0];
$tlkd_form=$key_itms[1];
$tlkd_gram=trim($tlkd_gram);
$tlkd_form=trim($tlkd_form);
$stlkd_form=str_replace(" ","+",$tlkd_form);
$stlkd_gram=str_replace(" ","+",$tlkd_gram);
$tlkd_form=str_replace("START","",$tlkd_form);
// echo "
TLKD KEY".$tlkd_key." TLKD VAL ".$tlkd_val." GRAMMATICA ".$tlkd_gram." WOORDVORM ".$tlkd_form."
";
///////////////////////
$tlkd_pos=strpos($invr_bzv1,$tlkd_form,0);
// echo "
TLKD POS ".$tlkd_pos;
$ptlkd_form="".$tlkd_form."";
$pline_bzv1=str_replace($tlkd_form,$ptlkd_form,$invr_bzv1);
// echo "
".$ptlkd_form;
if ($tlkd_pos === false)
{
// echo "
The string ".$tlkd_form." was not found in the string ".$line_bzv1;
}
else
{
// echo "
STRING FOUND TLKD FORM ".$tlkd_form."
";
$form_dtls=explode(" ",$tlkd_form);
// echo "
AANTAL FORM DTLS ".count($form_dtls);
// print_r($form_dtls);
$tlkd_dtls=explode($tlkd_form,$invr_bzv1);
// echo "
".$tlkd_form."
";
// echo "
AANTAL TLKD DTLS ".count($tlkd_dtls);
// print_r($tlkd_dtls);
if (count($tlkd_dtls) > 1 and count($form_dtls) > 2)
{
echo "
<category><pattern>".$tlkd_form." * </pattern><template><srai>".$tlkd_dtls[0]."><star/></srai></template></category>";
// print_r($tlkd_dtls);
}
$pline_bzv1=str_replace($tlkd_form,$ptlkd_form,$strn_val);
// echo "
".$pline_bzv1;
// echo "
".$tlkd_form."+".$tlkd_val;
$tlkd_smts[$tlkd_form."+".$tlkd_val]=$tlkd_smts[$tlkd_form."+".$tlkd_val]+1;
// echo "
".$tlkd_form."";
// echo "
LOCATIE ".$tlkd_form." POS ".$tlkd_pos;
// $tlkd_itms=explode(" ",$tlkd_form);
// echo "
TLKD ITMS
";
// print_r($tlkd_itms);
}
}
}
$fk=0;
/// echo "
".$cs."-".$strn_val;
echo "";
// echo "Segment | Question | Grammatica |
";
$gr=0;
ksort($tlkd_smts);
foreach($tlkd_smts as $tlkd_key => $tlkd_val)
{
// echo "
TLKD SMTS KEY ".$tlkd_key." VAL ".$tlkd_val;
$smts_plus=explode("+",$tlkd_key);
// print_r($smts_plus);
$smts_text=$smts_plus[0];
$smts_gram=$smts_plus[1];
$smts_perd=explode(".",$smts_gram);
echo "
SMTS TEXT ".$smts_text. "TAAL ".$text_taal;
// print_r($smts_perd);
$text_dtls=explode(" ",$smts_text);
//////////////////////////////// RULE PROCESSING //////////////////////
if ($hrelt != $smts_text)
{
// echo "
WERKT HET WEL VOOR GW27";
$rule_rslt=xtrt_xxxx($smts_text,$text_taal,"gw27",2);
// print_r($rule_rslt);
$ssmts_text=str_replace(" ","+",$smts_text);
$sinvr_lgrm=str_replace(" ","+",$invr_lgrm);
$sinvr_cont=str_replace(" ","+",$invr_cont);
$lbzv1_lnks="".$smts_text."";
$rule_rslt=xtrt_xxxx("xdotx".$splt_key,$invr_taal,"rule");
// print_r($rule_rslt);
if (count($rule_rslt) > 0)
{
if ($sw_onderwerp == 0)
{
echo "Klik op het antwoord of de uiting waar u mee verder wilt |
";
}
$sw_dotx=1;
foreach ($rule_rslt as $tref_key => $tref_val)
{
// echo "
RULE KEY ".$tref_key."TREF VAL ".$tref_val;
$rule_itms=explode("!!",$tref_key);
$tref_scre=$rule_itms[0];
$tref_taal=$rule_itms[1];
$tref_domn=$rule_itms[2];
$domn_itms=explode("@",$tref_domn);
$tref_vrag=$rule_itms[3];
$tref_antw=$rule_itms[4];
$tlkd_pos=strpos($invr_bzv1,$tref_vrag,0);
// echo "
TLKD POS ".$tlkd_pos;
if ($tlkd_pos === false)
{
// echo "
The string ".$invr_bzv1." was not found in the string ".$tref_vrag;
}
else
{
if ($tref_antw != "splt")
{
if ($arelt != $tref_antw)
{
// echo "
TREF ANTW ".$tref_antw;
$mtref_antw=str_replace("??",$tref_vrag,$tref_antw);
$mtref_antw=str_replace("invrdomn",$tref_domn,$mtref_antw);
$mtref_antw=str_replace("invrchbt",$invr_chbt,$mtref_antw);
$mtref_antw=str_replace("invrcorp",$invr_corp,$mtref_antw);
$mtref_antw=str_replace("invrantw",$invr_bzv1,$mtref_antw);
$mtref_antw=str_replace("invr_zv2",$invr_domn,$mtref_antw);
$mtref_antw=str_replace("invrpts",$invr_pts,$mtref_antw);
$mtref_antw=str_replace("invrbzkr",$invr_name,$mtref_antw);
$stref_antw=str_replace(" ","+",$mtref_antw);
// echo " MTREF ANTW ".$mtref_antw;
$ltref_antw="".$mtref_antw."";
// echo "".$tref_scre." | ".$tref_domn." | ".$invr_chbt." | ".$tref_antw." |
";
// echo "".$ltref_antw." |
";
$arelt=$tref_antw;
}
}
}
}
// echo "
";
}
}
$aiml_rslt=xtrt_aiml($smts_text);
// print_r($aiml_rslt);
foreach($aiml_rslt as $aiml_key => $aiml_val)
{
$aiml_dtls=explode("@",$aiml_key);
// echo "
".$aiml_dtls[1];
}
// echo "".$smts_text." | ".$lbzv1_lnks." | ".$smts_gram." |
";
foreach($rule_rslt as $rule_key => $rule_val)
{
$rule_dtls=explode("!!",$rule_key);
// print_r($rule_dtls);
echo " | ".$rule_dtls[3]." |
";
$rule_lnks=$rule_dtls[3];
$rule_rchs=$rule_dtls[4];
$rule_array[$rule_lnks."@".$rule_rchs."@".$smts_text]=$rule_array[$rule_lnks."@".$rule_rchs."@".$smts_text]+1;
}
// echo "".$form_gram."-".$wrds_gram." | ".$rchs_itms[0]." | ".$rchs_itms[1]." |
";
// echo "".$form_gram."-".$wrds_gram." | ".$srchs." |
";
$hrelt = $smts_text;
$invr_cont=$smts_text;
$smts_itms=explode(" ",$tlkd_key);
// print_r($smts_itms);
// echo "
AANTAL SMTS ITMS ".count($tlkd_smts);
$sinvr_domn=str_replace(" ","+",$invr_domn);
$gram_itms=explode(".",$tlkd_key);
// print_r($gram_itms);
// echo "
GRAM ITMS ".$gram_itms[1];
$form_itms=explode("+",$gram_itms[0]);
// print_r($form_itms);
$wrds_form=$form_itms[0];
$form_gram=$form_itms[1];
$wrds_gram=$gram_itms[1];
$isrt_qstn="";
$prchs_val="";
}
// echo "
AFTER ONDERWERP ".
$sw_onderwerp=0;
$sw_dotx=0;
// echo "";
/////////////////////////////////////////////////////
// echo "
".$invr_bzv1." CORPUS ".$invr_corp." GESPREKSPARTNER ".$invr_chbt;
// echo "
".$invr_bzv1;
//////////////////////////////////
$str=$invr_bzv1;
// print_r($str);
$sinvr_bzv1=str_replace(" ","+",$invr_bzv1);
$sinvr_lgrm=str_replace(" ","+",$invr_lgrm);
// $chck_rslt=chck_utf8($str);
// print_r($chck_rslt);
if ($invr_brkb != null)
{
$calc_rslt=calc_text($str,$invr_chbt,$invr_corp,$invr_taal);
$calc_brkb=$invr_brkb;
$calc_rslt[brkb]=$calc_brkb;
}
else
{
$calc_rslt=calc_text($str,$invr_chbt,$invr_corp,$invr_taal);
$calc_brkb=$calc_rslt[brkb];
// echo "
INVR BRKB ".$invr_brkb." CALC BRKB ".$calc_brkb;
}
$calc_rslt[aanleiding]=$invr_lgrm;
if ($invr_lgrm != null)
{
// echo "
LGRM PROCES INVR BZV1 ".$invr_bzv1." INVR LGRM ",$invr_lgrm;
$calc_rslt[aanleiding]=$invr_lgrm;
}
$calc_rslt[lokatie]="thuis";
if ($invr_home != null)
{
// echo "
LGRM PROCES INVR BZV1 ".$invr_bzv1." INVR LGRM ",$invr_lgrm;
$calc_rslt[lokatie]=$invr_home;
}
$calc_rslt['corpus']=$invr_corp;
$calc_rslt['chatbot']=$invr_chbt;
asort($calc_rslt);
// print_r($calc_rslt);
echo '';
// echo 'KEY | VALUE |
';
foreach($calc_rslt as $calc_key => $calc_val)
{
// echo ''.$calc_key.' | '.$calc_val.' |
';
}
echo '
';
// require_once("fnsh-func.php");
?>